package com.sharelords.demo.web.service;

import com.sharelords.demo.common.result.ViewResult;
import com.sharelords.demo.web.request.ConditionReqParam;
import com.sharelords.demo.web.request.DemoTestSaveParam;
import com.sharelords.demo.web.request.DemoTestUpdateParam;
import com.sharelords.demo.web.vo.DemoTestVo;

import java.util.List;

/**
 * @Description: demo项目接口测试相关业务
 *
 * @Author: 千古龙少
 * @Time: 2019/11/20 0:09
 */
public interface DemoTestService {

    /**
     * 新增
     *
     * @Author: 千古龙少
     * @Time: 2019/12/8 16:21
     * @param param
     * @return com.sharelords.demo.common.result.ViewResult<java.lang.Integer>
     */
    ViewResult<Integer> save(DemoTestSaveParam param);

    /**
     * 更新
     *
     * @Author: 千古龙少
     * @Time: 2019/12/8 16:21
     * @param param
     * @return com.sharelords.demo.common.result.ViewResult<java.lang.Integer>
     */
    ViewResult<Integer> update(DemoTestUpdateParam param);

    /**
     * 删除
     *
     * @Author: 千古龙少
     * @Time: 2019/12/8 16:21
     * @param id
     * @return com.sharelords.demo.common.result.ViewResult<java.lang.Integer>
     */
    ViewResult<Integer> delete(Long id);

    /**
     * 根据id获取详情
     *
     * @Author: 千古龙少
     * @Time: 2019/11/20 0:12
     * @param id
     * @return com.sharelords.demo.web.common.result.ViewResult<com.sharelords.demo.web.vo.DemoTestVo>
     */
    ViewResult<DemoTestVo> getDetail(Long id);

    /**
     * 根据姓名获取详情
     *
     * @Author: 千古龙少
     * @Time: 2019/11/24 21:01
     * @param name
     * @return com.sharelords.demo.common.result.ViewResult<com.sharelords.demo.web.vo.DemoTestVo>
     */
    ViewResult<DemoTestVo> getDetailByName(String name);

    /**
     * 多条件分页获取数据列表
     *
     * @Author: 千古龙少
     * @Time: 2019/11/25 23:37
     * @param reqParam
     * @param pageNum
     * @param pageSize
     * @return com.sharelords.demo.common.result.ViewResult<com.sharelords.demo.web.vo.DemoTestVo>
     */
    ViewResult<List<DemoTestVo>> getPageListByConditions(ConditionReqParam reqParam, Integer pageNum, Integer pageSize);

    /**
     * 多条件查询记录数
     *
     * @Author: 千古龙少
     * @Time: 2019/11/26 23:58
     * @param reqParam
     * @return com.sharelords.demo.common.result.ViewResult<java.lang.Integer>
     */
    ViewResult<Integer> getCount(ConditionReqParam reqParam);

}
